<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>接单后台管理</title>
        <link rel="stylesheet" type="text/css" href="../../static/news/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../static/news/css/main.css">
    <script type="text/javascript" src="../../static/news/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="../../static/news/js/main.js"></script>
    <link rel="stylesheet" type="text/css" href="../../static/admin/css/layui.css">
    <link rel="stylesheet" type="text/css" href="../../static/admin/css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../static/admin/css/main.css">
    <script type="text/javascript" src="../../static/admin/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="../../static/admin/js/jquery.form.min.js"></script>
    <script src="../../static/admin/tinymce/js/tinymce/tinymce.min.js"></script>
    <script src="../../static/admin/js/tinymce_setup.js"></script>


    <script src="../../static/admin/js/news_edit_detail.js"></script>
</head>
<body>
<div class="breadcrub">
    当前位置：接单管理 > 今日新增订单

    <form class="news_filter_form">
        <input type="text" placeholder="输入员工查找订单" class="input_txt" name="keywords">
        <input type="submit" value="搜 索" class="input_sub">
    </form>
</div>
<div class="pannel">
    <table class="common_table">
        <tr>
            <th width="5%">编号</th>
            <th width="8%">接单日期</th>

            <th width="10%">商品图片</th>
            <th width="5%">站点/店铺</th>

            <th width="5%">卖家/类型</th>
            <th width="5%">接单/下单金额</th>
            <th width="5%">操作员工</th>
            <th width="10%">备注</th>
            <th width="5%">订单状态</th>
            <th width="5%">详细信息</th>
            {% if data.user.is_admin!=2%}
            <th width="2%">操作</th>
{% endif%}

        </tr>
        {% for news in data.news_list %}
        <span id="show_id" style="display:none">{{news.id}}</span>
            <tr>
                <td>{{ news.id }}</td>
                <td >{{ news.jiedan_time }}</td>
                <td><img src="/static/img/item_picture/{{news.item_picture}}"></td>
                  {% if news.site_id==1%}
                <td>US</td>
                {% elif news.site_id==2%}
                <td>UK</td>
                {% elif news.site_id==3%}
                <td>DE</td>
                {% elif news.site_id==4%}
                <td>CA</td>
                {% endif %}

                {% if news.seller_id==1%}
                <td>卖家</td>
                {% else %}
                <td>买家</td>
                {% endif %}
                 <td>{{ news.amount }}</td>
                  <td>{{ news.staff_name }}</td>
                <td>{{ news.ps }}</td>
               {% if news.status_id==1%}
                <td>
                    <a href="#" class="review1_wxd" id="wxd_order">未下单</a>
                </td>
                {% elif news.status_id==2%}
                 <td>
                    <a href="#" class="review1_yxd" id="dsp_order">待上评</a>
                </td>
                {% elif news.status_id==3%}
                 <td>
                    <a href="#" class="review1_dsp" id="djz_order">待结账</a>
                </td>

                 {% elif news.status_id==4%}
                 <td>
                    <a href="#" class="review1_yjz">已结账</a>
                </td>
                {% endif %}
                <td>
                    <a href="/admin/order_info?order_id={{news.id}}" class="review">查看</a>
                </td>
                {% if data.user.is_admin!=2%}
                <td>
                    <a href="/admin/del_order?order_id={{news.id}}" style="color:#45b2b8b5">删除</a>
                </td>
                {% endif %}
            </tr>
        {% endfor %}
    </table>
</div>

<div class="box">
    <div id="pagination" class="page"></div>
</div>

<input type="hidden" id="csrf" value="{{ csrf_token() }}"/>



<script src="../../static/admin/js/layui.js" charset="utf-8"></script>
 <script>
$(document).ready(function(){

   $("#order_id").click(function(){
       $(".login_form_con").show();
   })

   $("#pldz").click(function(){
       $(".login_form_con1").show();
   })

   $("#ps").click(function(){
       $(".login_form_con2").show();
   })

    $("#wxd_order").click(function(){
       $(".login_form_con3").show();
   })

    $("#dsp_order").click(function(){
       $(".login_form_con4").show();
   })
    $("#djz_order").click(function(){
       $(".login_form_con5").show();
   })

  $(".to_register").click(function(){
       $(".login_form_con1").hide();
       $(".login_form_con2").hide();
       $(".login_form_con3").hide();
       $(".login_form_con4").hide();
       $(".login_form_con5").hide();
   })
});

</script>
<script>

var order_id=$("#show_id").text()
var a= $("#csrf").val()
console.log(url)
var url="http://127.0.0.1:5000/admin/test_date"+"/"+order_id+"h"
layui.use('upload', function(){
  var $ = layui.jquery
  ,upload = layui.upload;

  //拖拽上传
  upload.render({
    elem: '#test10'
     ,headers:{
                'X-CSRFToken': a,
            }
    ,url: url
    ,done: function(res){
      $("#login_form_con3").hide()
      location.reload();
      layer.msg('上传成功');
      layui.$('#uploadDemoView').removeClass('layui-hide').find('img').attr('src', res.files.file);
    }
  });
});
</script>
<script>
    $(function () {
        $("#pagination").pagination({
            currentPage: {{ data.current_page }},
            totalPage: {{ data.total_page }},

            callback: function (current) {
                window.location = '/admin/news_review?p=' + current
            }
        });
    });
</script>

</body>
</html>